// 数据类型的定义 

// 返回的基础数据类型
export interface ResponseData {
    code: number,
    message: string,
    ok: boolean,
};

// 菜单数据与按钮数据的Ts类型
export interface Permission {
    id?: number,
    createTime: string,
    updateTime: string,
    pid: number,
    code: null,
    toCode: null,
    type: number,
    status: null,
    level: number,
    children?: PermissionList,
    select: boolean,
};

// 子菜单的数据类型
export type PermissionList = Permission[];

// 菜单接口的返回值的类型
export interface PermissionResponseData extends ResponseData {
    data: PermissionList
}
// 添加或更新的请求数据类型
export interface MenuParams {
    id?: number,//ID
    code: string,//权限值
    level: number,//几级菜单
    name: string,//菜单的名字
    pid: number,//菜单的id
}